<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>111</title>
</head>
    <style>
		*{
			margin:0;
			padding: 0;
		}
		.container{
			width: 500px;
			border:2px solid red;
			margin:20px auto;
			overflow:hidden;
		}
		.box{
			width: 100px;
			height: 50px;
			background-color:pink;
			font-size: 30px;
			float:left;
		}
		.ccc{
			clear:both;
		}
	</style>
</head>
<body>
	<div class="container">
		<div class="box">1</div>
		<div class="box">2</div>
		<div class="box">3</div>
		<div class="box">4</div>
		<div class="ccc"></div>
	</div>
</body>
</html>